import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        redirect:'/login'
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login/Index.vue')
    },
    {
        path: '/register',
        name: 'register',
        component: () => import('@/views/register/Index.vue')
    },
    {
        path: '/home',
        redirect: '/home/student',
        name: 'home',
        component: () => import('@/views/home/Index.vue'),
        children:[
            {
                path: 'student',
                name: 'student',
                component: () => import('@/views/student/Index.vue')
            }
        ]
    },
    {
        path: '/dataScreen',
        name: 'dataScreen',
        component: () => import('@/views/screen/Index.vue')
    }
]

const router = new VueRouter({
    routes
})

export default router
